package util;

import java.security.MessageDigest;

import sun.misc.BASE64Encoder;

public class MD5 {
	public static String md5(String str){
		try {
			MessageDigest md = MessageDigest.getInstance("MD5");
			byte[] bys = md.digest(str.getBytes());
			return new BASE64Encoder().encode(bys);
		} catch (Exception e) {
			return null;
		}
	}
	public static void main(String[] args){
		System.out.println(md5("25"));
	}
}
